//2、显示对应的新闻标题、图片、链接
function showPic(whichPic) {
    //显示新闻图片的对象
    var placeholder=document.getElementById("placeholder");
    //显示新闻标题和链接的对象
    var description=document.getElementById("description");
    //显示内容数据
    var imgSrc=whichPic.getAttribute("data-image");
    //标题
    var newTitle=whichPic.getAttribute("title");
    //链接地址
    var url=whichPic.getAttribute("data-url");
    console.log(imgSrc+"|"+newTitle+"|"+url);

    //设置内容
    placeholder.setAttribute("src",imgSrc);
    description.setAttribute("href",url);
    description.innerText = newTitle;
}

//2、默认显示的图片新闻   获得li.first的子标签
// console.log(document.getElementsByClassName("first")[0].firstChild);
showPic(document.getElementsByClassName("first")[0].firstChild);

//3、图片轮播 (定时器) setInterval  setTimeout
